using UwinEducation.Application.Dtos;
using UwinEducation.Shared.Models;

namespace UwinEducation.Application.Common.Interfaces
{
    /// <summary>
    /// 角色服务接口
    /// </summary>
    public interface IRoleService
    {
        /// <summary>
        /// 获取角色分页列表
        /// </summary>
        Task<PagedResult<RoleDto>> GetPagedListAsync(PageRequest pageRequest);

        /// <summary>
        /// 获取角色详情
        /// </summary>
        Task<RoleDto> GetByIdAsync(Guid id);

        /// <summary>
        /// 创建角色
        /// </summary>
        Task<RoleDto> CreateAsync(CreateRoleDto input);

        /// <summary>
        /// 更新角色
        /// </summary>
        Task UpdateAsync(UpdateRoleDto input);

        /// <summary>
        /// 删除角色
        /// </summary>
        Task DeleteAsync(Guid id);

        /// <summary>
        /// 分配菜单权限
        /// </summary>
        Task AssignMenusAsync(AssignMenusDto input);

        /// <summary>
        /// 获取角色的菜单列表
        /// </summary>
        /// <param name="roleId">角色ID</param>
        Task<List<string>> GetPermissionCodesAsync(Guid roleId);
    }
}